# coding=utf-8

# 属性描述符，属性描述的优先级最高。
class Descripter:
	def __get__(self, instance, owner):
		print(self, instance, owner)

	def __set__(self, instance, value):
		print(self, instance, value)

class TestClass:
	Des = Descripter()


	def __getattribute__(self, name):
		print("before __getattribute__")
		return	super(TestClass, self).__getattribute__(name)
		print("after __getattribute__")

	def __setattr__(self, name, value):
		print("before __setattr__")
		super(TestClass, self).__setattr__(name, value)
		print("after __setattr__")

test1 = TestClass()
test2 = TestClass()

test1.Des = None
test2.Des